/*
 * Copyright (C) 2010 Graham Allan
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package edu.strath.cis.grallan.findbugs.adaptiveranking;

import edu.umd.cs.findbugs.BugInstance;

/**
 * 
 * An AdaptiveRankBug is used to assign a rank to a bug instance. <br>
 * <br>
 * The specific ranking scheme is left to implementors, and is specified by using the parameterised
 * type of {@link AdaptiveRankBug}. The type, as with the {@link Comparable} interface, should have
 * a total ordering. <br>
 * <br>
 * It is expected that implementing classes should strive for immutability. The {@link BugInstance}
 * for this should not be reassigned, nor should it be modified.
 * 
 * @see Comparable
 * @see BugInstance
 * 
 * @author Graham Allan (grallan@cis.strath.ac.uk)
 */
public interface AdaptiveRankBug<T extends Comparable<T>> {

	T rank();

	BugInstance bug();

}
